/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2022-2022. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * Description:
 * Author: huawei
 * Create: 2022-6-27
 */
#ifndef DEV_IDENTITY_MODULE_H
#define DEV_IDENTITY_MODULE_H

#include <linux/sched.h>
#include <linux/printk.h>

#ifdef STATIC_SKIP
#define STATIC
#else
#define STATIC static
#endif

#define module_didty "dbl_dev_identity"

#define didty_err(fmt, ...) \
    (void)printk(KERN_ERR "[ascend] [%s] [%s %d] <%s:%d> " fmt, \
                 module_didty, __func__, __LINE__, current->comm, current->tgid, ##__VA_ARGS__)
#define didty_warn(fmt, ...) \
    (void)printk(KERN_WARNING "[ascend] [%s] [%s %d] <%s:%d> " fmt, \
                 module_didty, __func__, __LINE__, current->comm, current->tgid, ##__VA_ARGS__)
#define didty_info(fmt, ...) \
    (void)printk(KERN_INFO "[ascend] [%s] [%s %d] <%s:%d> " fmt, \
                 module_didty, __func__, __LINE__, current->comm, current->tgid, ##__VA_ARGS__)
#define didty_event(fmt, ...) \
    (void)printk(KERN_NOTICE "[ascend] [%s] [%s %d] <%s:%d> " fmt, \
                 module_didty, __func__, __LINE__, current->comm, current->tgid, ##__VA_ARGS__)
#define didty_debug(fmt, ...) \
    pr_debug("[ascend] [%s] [%s %d] <%s:%d> " fmt, \
             module_didty, __func__, __LINE__, current->comm, current->tgid, ##__VA_ARGS__)

#endif /* DEV_IDENTITY_MODULE_H */

